home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1999 / MacHack 1999.toast / The Hacks / FinderHelper / OneClick 2.0 PR3 for MacHack CD / OneClick Folder / Extensions / Scrap Extension / Scrap Extension.rsrc / TEXT_4440_GetScrap.txt < prev    next >
Encoding:
Text File  |  1999-04-08  |  973 b   |  28 lines

  1. GetScrap function
  2.  
  3. Syntax
  4. GetScrap resourceType
  5.  
  6. Description
  7. Returns the data of the specified resource type from the Clipboard. Use GetScrap and SetScrap instead of the Clipboard system variable when you want to work with data types other than plain text.
  8.  
  9. Examples
  10. // Get the picture on the Clipboard and store it in a variable
  11. Variable thePictureData
  12. thePictureData = GetScrap ‚ÄúPICT"
  13.  
  14. // Get the TEXT/styl (styled text) resource pair from the Clipboard and store it in a resource file
  15. // Copy some styled text to the Clipboard from a styled-text-aware application
  16. // (such as SimpleText or AppleWorks) before running this script
  17. Variable theText, theStyle, theFile
  18. theFile = "Mac HD:Desktop Folder:My Resource File"
  19. theText = GetScrap "TEXT"
  20. theStyle = GetScrap "styl"
  21. SetResource theFile, theText, "TEXT", 128
  22. SetResource theFile, theStyle, "styl", 128
  23.  
  24. Author Info
  25. GetScrap, part of Scrap Extension
  26. Copyright ¬© 1999 Life OnLine Software (lr). All rights reserved.
  27.  
  28.